//
//  AppRequest.m
//  ApeExample
//
//  Created by Eton on 2017/7/31.
//  Copyright © 2017年 王-庭协. All rights reserved.
//

#import "AppRequest.h"
#import "AppHTTPService.h"

@implementation AppRequest

+ (RACSignal *)racGET:(NSString *)url
               params:(NSDictionary *)params
                class:(Class)clazz{
    return [AppRequest racMethod:ApeMethod_GET url:url params:params class:clazz cachePolicy:ApeCachePolicy_IGNORING_CACHE_DATA];
}

+ (RACSignal *)racPOST:(NSString *)url
                params:(NSDictionary *)params
                 class:(Class)clazz{
    return [AppRequest racMethod:ApeMethod_POST url:url params:params class:clazz cachePolicy:ApeCachePolicy_IGNORING_CACHE_DATA];
}


+ (RACSignal *)racMethod:(ApeMethod )method
                     url:(NSString *)url
                  params:(NSDictionary *)params
                   class:(Class)clazz
             cachePolicy:(ApeCachePolicy )cachePolicy{
    return [[AppHTTPService shared] racMethod:method url:url params:params class:clazz cachePolicy:cachePolicy];
}
@end
